package com.ocl.www.service;

import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

/**
 * Created by Administrator on 2017/6/1.
 */
@Service
public class DemoService {
    @Cacheable(value = "onecache",keyGenerator = "wiselyKeyGenerator")
    public String findNo(){
        System.out.println("无缓存的时候调用这里");
        return new String("FIND123");
    }
//    @Cacheable(value = "twocache",keyGenerator = "wiselyKeyGenerator")
//    public String findYes(){
//        System.out.println("无缓存的时候调用这里");
//        return new String("FINDqwe");
//    }
}
